<template>
  <div>
    <el-rate
      v-model="value"
      :icon-classes="iconClasses"
      void-icon-class="icon-rate-face-off"
      :colors="['#99A9BF', '#F7BA2A', '#FF9900']"
      @change="sendMsg"
    >
    </el-rate>
  </div>
</template>

<script>
  export default {
    data() {
      return {
        value: null,
        iconClasses: ['icon-rate-face-1', 'icon-rate-face-2', 'icon-rate-face-3'] // 等同于 { 2: 'icon-rate-face-1', 4: { value: 'icon-rate-face-2', excluded: true }, 5: 'icon-rate-face-3' }
      }
    },
    props: {
        value:null,
    },
    methods: {
        sendMsg(){
            this.$emit("rate2-value",this.value)
        }
    }
  }
</script>